#pragma once
#include "Float4.h"
namespace Alice{
    class Matrix3 {
    public:
        union
        {
            struct {
                float _11, _12, _13;
                float _21, _22, _23;
                float _31, _32, _33;
            };
            float v[9];
        };
        void LoadIdentity();
        void SetScale(float inX, float inY, float inZ);
        void operator=(const Matrix3& inRightValue);
        Matrix3 operator*(const Matrix3& inRightValue)const;
        void Transpose();
        float Determinant() const;
    };
    class Matrix4{
    public:
        union 
        {
            struct {
                float _11, _12, _13, _14;
                float _21, _22, _23, _24;
                float _31, _32, _33, _34;
                float _41, _42, _43, _44;
            };
            float v[16];
        };
        void LoadIdentity();
        void Perspective(float inFOVInAngle, float inAspect, float inNear, float inFar);
        void LookAt(const float4&inCameraPosition,
            const float4&inTargetPosition,const float4&inHelpVector);
        void SetLeftTop3x3(const Matrix3& inM);
        void Tranlate(float inX, float inY, float inZ);
        Matrix3 GetMIJ(int inRow, int inColumn) const;
        void Transpose();
        float Determinant() const;
        Matrix4 Invert() const;
        Matrix4 operator*(const Matrix4& inM)const;
        void operator=(const Matrix4& inM);
    };
    float4 operator*(const float4&inV,const Matrix4&inM);
}